package activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;

import com.example.administrator.ci_edit.R;

import javax.mail.MessagingException;

/**
 * Created by mary on 2017/7/13.
 */

public class ForgetPasswordActivity extends Activity {
    private EditText EmailAddress;
    public String address;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_forgetpass);
        Button button6;
        button6=(Button)findViewById(R.id.button6);
        EmailAddress=(EditText)findViewById(R.id.emailAddress);
        button6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                address=EmailAddress.getText().toString();
                new Thread(run).start();
            }
        });
    }
    Runnable run=new Runnable() {
        @Override
        public void run() {
            try {
                SendEmail sendEmail=new SendEmail(address);
            } catch (MessagingException e) {
                e.printStackTrace();
            }
        }
    };
}
